home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 14 / CU Amiga Magazine's Super CD-ROM 14 (1997)(EMAP Images)(GB)(Track 1 of 3)[!][issue 1997-09].iso / CUCD / Programming / Mesa-2.2 / src / image.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-03-13  |  2.6 KB  |  88 lines

  1. /* $Id: image.h,v 1.4 1997/02/09 20:05:03 brianp Exp $ */
  2.  
  3. /*
  4.  * Mesa 3-D graphics library
  5.  * Version:  2.2
  6.  * Copyright (C) 1995-1997  Brian Paul
  7.  *
  8.  * This library is free software; you can redistribute it and/or
  9.  * modify it under the terms of the GNU Library General Public
  10.  * License as published by the Free Software Foundation; either
  11.  * version 2 of the License, or (at your option) any later version.
  12.  *
  13.  * This library is distributed in the hope that it will be useful,
  14.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  16.  * Library General Public License for more details.
  17.  *
  18.  * You should have received a copy of the GNU Library General Public
  19.  * License along with this library; if not, write to the Free
  20.  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  21.  */
  22.  
  23.  
  24. /*
  25.  * $Log: image.h,v $
  26.  * Revision 1.4  1997/02/09 20:05:03  brianp
  27.  * new arguments for gl_pixel_addr_in_image()
  28.  *
  29.  * Revision 1.3  1997/02/09 18:52:53  brianp
  30.  * added GL_EXT_texture3D support
  31.  *
  32.  * Revision 1.2  1996/11/06 04:22:23  brianp
  33.  * changed gl_unpack_image() components argument to srcFormat
  34.  *
  35.  * Revision 1.1  1996/09/13 01:38:16  brianp
  36.  * Initial revision
  37.  *
  38.  */
  39.  
  40.  
  41. #ifndef IMAGE_H
  42. #define IMAGE_H
  43.  
  44.  
  45. #include "types.h"
  46.  
  47.  
  48. extern void gl_flip_bytes( GLubyte *p, GLuint n );
  49.  
  50.  
  51. extern void gl_swap2( GLushort *p, GLuint n );
  52.  
  53. extern void gl_swap4( GLuint *p, GLuint n );
  54.  
  55.  
  56. extern GLint gl_sizeof_type( GLenum type );
  57.  
  58.  
  59. extern GLint gl_components_in_format( GLenum format );
  60.  
  61.  
  62. extern GLvoid *gl_pixel_addr_in_image( struct gl_pixelstore_attrib *packing,
  63.                                 const GLvoid *image, GLsizei width,
  64.                                 GLsizei height, GLenum format, GLenum type,
  65.                                 GLint img, GLint row, GLint column );
  66.  
  67.  
  68. extern struct gl_image *gl_unpack_image( GLcontext *ctx,
  69.                                   GLint width, GLint height,
  70.                                   GLenum srcFormat, GLenum srcType,
  71.                                   GLenum destType,
  72.                                   const GLvoid *pixels,
  73.                                   GLboolean interleave );
  74.  
  75.  
  76. struct gl_image *gl_unpack_image3D( GLcontext *ctx,
  77.                                     GLint width, GLint height,GLint depth,
  78.                                     GLenum srcFormat, GLenum srcType,
  79.                                     GLenum destType,
  80.                                     const GLvoid *pixels,
  81.                                     GLboolean interleave );
  82.  
  83.  
  84. extern void gl_free_image( struct gl_image *image );
  85.  
  86.  
  87. #endif
  88.